510 FOR Y=1 TO 24:LOCATE 0,Y:PRINT CHR$(27)+"T":NEXT:LOCATE 0,22:COLOR 5:PRINT " ★ コンパイルを始めます。"
520 FR=0
530 FOR Y=21 TO 24:LOCATE 0,Y:PRINT CHR$(27)+"T":NEXT:LOCATE 0,22:COLOR 5:PRINT " ★ コンパイルをしています。中断は[Break ]キーを押してください。":LOCATE 0,1:COLOR 7
540 L=0:N=N+1:INPUT#1,A$
550 L=L+1:IF A$="" THEN PRINT:PRINT#2,:GOTO 540
560 IF KMID$(A$,L,1)="[" THEN FR=1:L=L+1
570 IF FR=0 THEN PRINT KMID$(A$,L,1);:PRINT#2,KMID$(A$,L,1);:GOTO 600 ELSE IF FR=1 THEN 580
580 IF KMID$(A$,L,1)="." THEN AA=ASC(KMID$(A$,L+1,1)):IF (AA >= 65 AND AA <= 90) THEN GOSUB 1010 ELSE IF (AA >= 97 AND AA <= 122) THEN GOSUB 2000 ELSE GOSUB 3000
590 IF KMID$(A$,L,1)="]" THEN FR=0
600 IF L > KLEN(A$) THEN PRINT:PRINT#2, ELSE 550
610 IF EOF(1) THEN BEEP:LOCATE 0,22:PRINT CHR$(27)+"T":COLOR 5:LOCATE 0,22:PRINT " ★ コンパイルが終了しました。何かキーを押してください。":I$=INPUT$(1):CLOSE#1,#2:GOTO 100 ELSE GOTO 540
1000 '*** 変換 サブルーチン ***
1010 ' 大文字
1020 IF KMID$(A$,L+1,1)="A" THEN PRINT"А";:PRINT#2,"А"; :RETURN
1030 IF KMID$(A$,L+1,1)="B" THEN PRINT"Б";:PRINT#2,"Б"; :RETURN
1040 IF KMID$(A$,L+1,1)="V" THEN PRINT"В";:PRINT#2,"В"; :RETURN
1050 IF KMID$(A$,L+1,1)="G" THEN PRINT"Г";:PRINT#2,"Г"; :RETURN
1060 IF KMID$(A$,L+1,1)="D" THEN PRINT"Д";:PRINT#2,"Д"; :RETURN
1070 IF KMID$(A$,L+1,2)="YE" THEN PRINT"Е";:PRINT#2,"Е"; :L=L+1:RETURN
1080 IF KMID$(A$,L+1,2)="YO" THEN PRINT"Ё";:PRINT#2,"Ё"; :L=L+1:RETURN
1090 IF KMID$(A$,L+1,1)="J" THEN PRINT"Ж";:PRINT#2,"Ж"; :RETURN
1100 IF KMID$(A$,L+1,1)="Z" THEN PRINT"З";:PRINT#2,"З"; :RETURN
1110 IF KMID$(A$,L+1,1)="I" AND NOT KMID$(A$,L+1,2)="IK" THEN PRINT"И";:PRINT#2,"И"; :RETURN
1120 IF KMID$(A$,L+1,2)="IK" THEN PRINT"Й";:PRINT#2,"Й"; :L=L+1:RETURN
1130 IF KMID$(A$,L+1,1)="K" THEN PRINT"К";:PRINT#2,"К"; :RETURN
1140 IF KMID$(A$,L+1,1)="L" THEN PRINT"Л";:PRINT#2,"Л"; :RETURN
1150 IF KMID$(A$,L+1,1)="M" AND NOT KMID$(A$,L+1,2)="MZ" THEN PRINT"М";:PRINT#2,"М"; :RETURN
1160 IF KMID$(A$,L+1,1)="N" THEN PRINT"Н";:PRINT#2,"Н"; :RETURN
1170 IF KMID$(A$,L+1,1)="O" THEN PRINT"О";:PRINT#2,"О"; :RETURN
1180 IF KMID$(A$,L+1,1)="P" THEN PRINT"П";:PRINT#2,"П"; :RETURN
1190 IF KMID$(A$,L+1,1)="R" THEN PRINT"Р";:PRINT#2,"Р"; :RETURN
1200 IF KMID$(A$,L+1,1)="S" AND NOT KMID$(A$,L+1,2)="SH" AND NOT KMID$(A$,L+1,2)="SS" THEN PRINT"С";:PRINT#2,"С"; :RETURN
1210 IF KMID$(A$,L+1,1)="T" AND NOT KMID$(A$,L+1,2)="TT" AND NOT KMID$(A$,L+1,2)="TZ" THEN PRINT"Т";:PRINT#2,"Т"; :RETURN
1220 IF KMID$(A$,L+1,1)="U" THEN PRINT"У";:PRINT#2,"У"; :RETURN
1230 IF KMID$(A$,L+1,1)="F" THEN PRINT"Ф";:PRINT#2,"Ф"; :RETURN
1240 IF KMID$(A$,L+1,1)="H" THEN PRINT"Х";:PRINT#2,"Х"; :RETURN
1250 IF KMID$(A$,L+1,2)="TT" THEN PRINT"Ц";:PRINT#2,"Ц"; :L=L+1:RETURN
1260 IF KMID$(A$,L+1,2)="CH" THEN PRINT"Ч";:PRINT#2,"Ч"; :L=L+1:RETURN
1270 IF KMID$(A$,L+1,2)="SH" THEN PRINT"Ш";:PRINT#2,"Ш"; :L=L+1:RETURN
1280 IF KMID$(A$,L+1,2)="SS" THEN PRINT"Щ";:PRINT#2,"Щ"; :L=L+1:RETURN
1290 IF KMID$(A$,L+1,2)="TZ" THEN PRINT"Ъ";:PRINT#2,"Ъ"; :L=L+1:RETURN
1300 IF KMID$(A$,L+1,2)="WI" THEN PRINT"Ы";:PRINT#2,"Ы"; :L=L+1:RETURN
1310 IF KMID$(A$,L+1,2)="MZ" THEN PRINT"Ь";:PRINT#2,"Ь"; :L=L+1:RETURN
1320 IF KMID$(A$,L+1,1)="E" THEN PRINT"Э";:PRINT#2,"Э"; :RETURN
1330 IF KMID$(A$,L+1,2)="YU" THEN PRINT"Ю";:PRINT#2,"Ю"; :L=L+1:RETURN
1340 IF KMID$(A$,L+1,2)="YA" THEN PRINT"Я";:PRINT#2,"Я"; :L=L+1:RETURN